﻿using System;

namespace XD.Common.GenericUtil
{
    public class GenericEnumCompAttribute : Attribute
    {
        public byte To;
        public byte From;
        public GenericEnumCompAttribute(byte from, byte to) => (From, To) = (from, to);
    }

    public readonly struct Empty {}
    public interface IGenericEnum { public byte Id { get; } }

    public readonly struct GenericEnum
    {
        public static byte Id<T>() where T : unmanaged, IGenericEnum => default(T).Id;

        public readonly struct E000 : IGenericEnum { public byte Id => 000; }
        public readonly struct E001 : IGenericEnum { public byte Id => 001; }
        public readonly struct E002 : IGenericEnum { public byte Id => 002; }
        public readonly struct E003 : IGenericEnum { public byte Id => 003; }
        public readonly struct E004 : IGenericEnum { public byte Id => 004; }
        public readonly struct E005 : IGenericEnum { public byte Id => 005; }
        public readonly struct E006 : IGenericEnum { public byte Id => 006; }
        public readonly struct E007 : IGenericEnum { public byte Id => 007; }
        public readonly struct E008 : IGenericEnum { public byte Id => 008; }
        public readonly struct E009 : IGenericEnum { public byte Id => 009; }
        public readonly struct E010 : IGenericEnum { public byte Id => 010; }
        public readonly struct E011 : IGenericEnum { public byte Id => 011; }
        public readonly struct E012 : IGenericEnum { public byte Id => 012; }
        public readonly struct E013 : IGenericEnum { public byte Id => 013; }
        public readonly struct E014 : IGenericEnum { public byte Id => 014; }
        public readonly struct E015 : IGenericEnum { public byte Id => 015; }
        public readonly struct E016 : IGenericEnum { public byte Id => 016; }
        public readonly struct E017 : IGenericEnum { public byte Id => 017; }
        public readonly struct E018 : IGenericEnum { public byte Id => 018; }
        public readonly struct E019 : IGenericEnum { public byte Id => 019; }
        public readonly struct E020 : IGenericEnum { public byte Id => 020; }
        public readonly struct E021 : IGenericEnum { public byte Id => 021; }
        public readonly struct E022 : IGenericEnum { public byte Id => 022; }
        public readonly struct E023 : IGenericEnum { public byte Id => 023; }
        public readonly struct E024 : IGenericEnum { public byte Id => 024; }
        public readonly struct E025 : IGenericEnum { public byte Id => 025; }
        public readonly struct E026 : IGenericEnum { public byte Id => 026; }
        public readonly struct E027 : IGenericEnum { public byte Id => 027; }
        public readonly struct E028 : IGenericEnum { public byte Id => 028; }
        public readonly struct E029 : IGenericEnum { public byte Id => 029; }
        public readonly struct E030 : IGenericEnum { public byte Id => 030; }
        public readonly struct E031 : IGenericEnum { public byte Id => 031; }
        public readonly struct E032 : IGenericEnum { public byte Id => 032; }
        public readonly struct E033 : IGenericEnum { public byte Id => 033; }
        public readonly struct E034 : IGenericEnum { public byte Id => 034; }
        public readonly struct E035 : IGenericEnum { public byte Id => 035; }
        public readonly struct E036 : IGenericEnum { public byte Id => 036; }
        public readonly struct E037 : IGenericEnum { public byte Id => 037; }
        public readonly struct E038 : IGenericEnum { public byte Id => 038; }
        public readonly struct E039 : IGenericEnum { public byte Id => 039; }
        public readonly struct E040 : IGenericEnum { public byte Id => 040; }
        public readonly struct E041 : IGenericEnum { public byte Id => 041; }
        public readonly struct E042 : IGenericEnum { public byte Id => 042; }
        public readonly struct E043 : IGenericEnum { public byte Id => 043; }
        public readonly struct E044 : IGenericEnum { public byte Id => 044; }
        public readonly struct E045 : IGenericEnum { public byte Id => 045; }
        public readonly struct E046 : IGenericEnum { public byte Id => 046; }
        public readonly struct E047 : IGenericEnum { public byte Id => 047; }
        public readonly struct E048 : IGenericEnum { public byte Id => 048; }
        public readonly struct E049 : IGenericEnum { public byte Id => 049; }
        public readonly struct E050 : IGenericEnum { public byte Id => 050; }
        public readonly struct E051 : IGenericEnum { public byte Id => 051; }
        public readonly struct E052 : IGenericEnum { public byte Id => 052; }
        public readonly struct E053 : IGenericEnum { public byte Id => 053; }
        public readonly struct E054 : IGenericEnum { public byte Id => 054; }
        public readonly struct E055 : IGenericEnum { public byte Id => 055; }
        public readonly struct E056 : IGenericEnum { public byte Id => 056; }
        public readonly struct E057 : IGenericEnum { public byte Id => 057; }
        public readonly struct E058 : IGenericEnum { public byte Id => 058; }
        public readonly struct E059 : IGenericEnum { public byte Id => 059; }
        public readonly struct E060 : IGenericEnum { public byte Id => 060; }
        public readonly struct E061 : IGenericEnum { public byte Id => 061; }
        public readonly struct E062 : IGenericEnum { public byte Id => 062; }
        public readonly struct E063 : IGenericEnum { public byte Id => 063; }
        public readonly struct E064 : IGenericEnum { public byte Id => 064; }
        public readonly struct E065 : IGenericEnum { public byte Id => 065; }
        public readonly struct E066 : IGenericEnum { public byte Id => 066; }
        public readonly struct E067 : IGenericEnum { public byte Id => 067; }
        public readonly struct E068 : IGenericEnum { public byte Id => 068; }
        public readonly struct E069 : IGenericEnum { public byte Id => 069; }
        public readonly struct E070 : IGenericEnum { public byte Id => 070; }
        public readonly struct E071 : IGenericEnum { public byte Id => 071; }
        public readonly struct E072 : IGenericEnum { public byte Id => 072; }
        public readonly struct E073 : IGenericEnum { public byte Id => 073; }
        public readonly struct E074 : IGenericEnum { public byte Id => 074; }
        public readonly struct E075 : IGenericEnum { public byte Id => 075; }
        public readonly struct E076 : IGenericEnum { public byte Id => 076; }
        public readonly struct E077 : IGenericEnum { public byte Id => 077; }
        public readonly struct E078 : IGenericEnum { public byte Id => 078; }
        public readonly struct E079 : IGenericEnum { public byte Id => 079; }
        public readonly struct E080 : IGenericEnum { public byte Id => 080; }
        public readonly struct E081 : IGenericEnum { public byte Id => 081; }
        public readonly struct E082 : IGenericEnum { public byte Id => 082; }
        public readonly struct E083 : IGenericEnum { public byte Id => 083; }
        public readonly struct E084 : IGenericEnum { public byte Id => 084; }
        public readonly struct E085 : IGenericEnum { public byte Id => 085; }
        public readonly struct E086 : IGenericEnum { public byte Id => 086; }
        public readonly struct E087 : IGenericEnum { public byte Id => 087; }
        public readonly struct E088 : IGenericEnum { public byte Id => 088; }
        public readonly struct E089 : IGenericEnum { public byte Id => 089; }
        public readonly struct E090 : IGenericEnum { public byte Id => 090; }
        public readonly struct E091 : IGenericEnum { public byte Id => 091; }
        public readonly struct E092 : IGenericEnum { public byte Id => 092; }
        public readonly struct E093 : IGenericEnum { public byte Id => 093; }
        public readonly struct E094 : IGenericEnum { public byte Id => 094; }
        public readonly struct E095 : IGenericEnum { public byte Id => 095; }
        public readonly struct E096 : IGenericEnum { public byte Id => 096; }
        public readonly struct E097 : IGenericEnum { public byte Id => 097; }
        public readonly struct E098 : IGenericEnum { public byte Id => 098; }
        public readonly struct E099 : IGenericEnum { public byte Id => 099; }
        public readonly struct E100 : IGenericEnum { public byte Id => 100; }
        public readonly struct E101 : IGenericEnum { public byte Id => 101; }
        public readonly struct E102 : IGenericEnum { public byte Id => 102; }
        public readonly struct E103 : IGenericEnum { public byte Id => 103; }
        public readonly struct E104 : IGenericEnum { public byte Id => 104; }
        public readonly struct E105 : IGenericEnum { public byte Id => 105; }
        public readonly struct E106 : IGenericEnum { public byte Id => 106; }
        public readonly struct E107 : IGenericEnum { public byte Id => 107; }
        public readonly struct E108 : IGenericEnum { public byte Id => 108; }
        public readonly struct E109 : IGenericEnum { public byte Id => 109; }
        public readonly struct E110 : IGenericEnum { public byte Id => 110; }
        public readonly struct E111 : IGenericEnum { public byte Id => 111; }
        public readonly struct E112 : IGenericEnum { public byte Id => 112; }
        public readonly struct E113 : IGenericEnum { public byte Id => 113; }
        public readonly struct E114 : IGenericEnum { public byte Id => 114; }
        public readonly struct E115 : IGenericEnum { public byte Id => 115; }
        public readonly struct E116 : IGenericEnum { public byte Id => 116; }
        public readonly struct E117 : IGenericEnum { public byte Id => 117; }
        public readonly struct E118 : IGenericEnum { public byte Id => 118; }
        public readonly struct E119 : IGenericEnum { public byte Id => 119; }
        public readonly struct E120 : IGenericEnum { public byte Id => 120; }
        public readonly struct E121 : IGenericEnum { public byte Id => 121; }
        public readonly struct E122 : IGenericEnum { public byte Id => 122; }
        public readonly struct E123 : IGenericEnum { public byte Id => 123; }
        public readonly struct E124 : IGenericEnum { public byte Id => 124; }
        public readonly struct E125 : IGenericEnum { public byte Id => 125; }
        public readonly struct E126 : IGenericEnum { public byte Id => 126; }
        public readonly struct E127 : IGenericEnum { public byte Id => 127; }
        public readonly struct E128 : IGenericEnum { public byte Id => 128; }
        public readonly struct E129 : IGenericEnum { public byte Id => 129; }
        public readonly struct E130 : IGenericEnum { public byte Id => 130; }
        public readonly struct E131 : IGenericEnum { public byte Id => 131; }
        public readonly struct E132 : IGenericEnum { public byte Id => 132; }
        public readonly struct E133 : IGenericEnum { public byte Id => 133; }
        public readonly struct E134 : IGenericEnum { public byte Id => 134; }
        public readonly struct E135 : IGenericEnum { public byte Id => 135; }
        public readonly struct E136 : IGenericEnum { public byte Id => 136; }
        public readonly struct E137 : IGenericEnum { public byte Id => 137; }
        public readonly struct E138 : IGenericEnum { public byte Id => 138; }
        public readonly struct E139 : IGenericEnum { public byte Id => 139; }
        public readonly struct E140 : IGenericEnum { public byte Id => 140; }
        public readonly struct E141 : IGenericEnum { public byte Id => 141; }
        public readonly struct E142 : IGenericEnum { public byte Id => 142; }
        public readonly struct E143 : IGenericEnum { public byte Id => 143; }
        public readonly struct E144 : IGenericEnum { public byte Id => 144; }
        public readonly struct E145 : IGenericEnum { public byte Id => 145; }
        public readonly struct E146 : IGenericEnum { public byte Id => 146; }
        public readonly struct E147 : IGenericEnum { public byte Id => 147; }
        public readonly struct E148 : IGenericEnum { public byte Id => 148; }
        public readonly struct E149 : IGenericEnum { public byte Id => 149; }
        public readonly struct E150 : IGenericEnum { public byte Id => 150; }
        public readonly struct E151 : IGenericEnum { public byte Id => 151; }
        public readonly struct E152 : IGenericEnum { public byte Id => 152; }
        public readonly struct E153 : IGenericEnum { public byte Id => 153; }
        public readonly struct E154 : IGenericEnum { public byte Id => 154; }
        public readonly struct E155 : IGenericEnum { public byte Id => 155; }
        public readonly struct E156 : IGenericEnum { public byte Id => 156; }
        public readonly struct E157 : IGenericEnum { public byte Id => 157; }
        public readonly struct E158 : IGenericEnum { public byte Id => 158; }
        public readonly struct E159 : IGenericEnum { public byte Id => 159; }
        public readonly struct E160 : IGenericEnum { public byte Id => 160; }
        public readonly struct E161 : IGenericEnum { public byte Id => 161; }
        public readonly struct E162 : IGenericEnum { public byte Id => 162; }
        public readonly struct E163 : IGenericEnum { public byte Id => 163; }
        public readonly struct E164 : IGenericEnum { public byte Id => 164; }
        public readonly struct E165 : IGenericEnum { public byte Id => 165; }
        public readonly struct E166 : IGenericEnum { public byte Id => 166; }
        public readonly struct E167 : IGenericEnum { public byte Id => 167; }
        public readonly struct E168 : IGenericEnum { public byte Id => 168; }
        public readonly struct E169 : IGenericEnum { public byte Id => 169; }
        public readonly struct E170 : IGenericEnum { public byte Id => 170; }
        public readonly struct E171 : IGenericEnum { public byte Id => 171; }
        public readonly struct E172 : IGenericEnum { public byte Id => 172; }
        public readonly struct E173 : IGenericEnum { public byte Id => 173; }
        public readonly struct E174 : IGenericEnum { public byte Id => 174; }
        public readonly struct E175 : IGenericEnum { public byte Id => 175; }
        public readonly struct E176 : IGenericEnum { public byte Id => 176; }
        public readonly struct E177 : IGenericEnum { public byte Id => 177; }
        public readonly struct E178 : IGenericEnum { public byte Id => 178; }
        public readonly struct E179 : IGenericEnum { public byte Id => 179; }
        public readonly struct E180 : IGenericEnum { public byte Id => 180; }
        public readonly struct E181 : IGenericEnum { public byte Id => 181; }
        public readonly struct E182 : IGenericEnum { public byte Id => 182; }
        public readonly struct E183 : IGenericEnum { public byte Id => 183; }
        public readonly struct E184 : IGenericEnum { public byte Id => 184; }
        public readonly struct E185 : IGenericEnum { public byte Id => 185; }
        public readonly struct E186 : IGenericEnum { public byte Id => 186; }
        public readonly struct E187 : IGenericEnum { public byte Id => 187; }
        public readonly struct E188 : IGenericEnum { public byte Id => 188; }
        public readonly struct E189 : IGenericEnum { public byte Id => 189; }
        public readonly struct E190 : IGenericEnum { public byte Id => 190; }
        public readonly struct E191 : IGenericEnum { public byte Id => 191; }
        public readonly struct E192 : IGenericEnum { public byte Id => 192; }
        public readonly struct E193 : IGenericEnum { public byte Id => 193; }
        public readonly struct E194 : IGenericEnum { public byte Id => 194; }
        public readonly struct E195 : IGenericEnum { public byte Id => 195; }
        public readonly struct E196 : IGenericEnum { public byte Id => 196; }
        public readonly struct E197 : IGenericEnum { public byte Id => 197; }
        public readonly struct E198 : IGenericEnum { public byte Id => 198; }
        public readonly struct E199 : IGenericEnum { public byte Id => 199; }
        public readonly struct E200 : IGenericEnum { public byte Id => 200; }
        public readonly struct E201 : IGenericEnum { public byte Id => 201; }
        public readonly struct E202 : IGenericEnum { public byte Id => 202; }
        public readonly struct E203 : IGenericEnum { public byte Id => 203; }
        public readonly struct E204 : IGenericEnum { public byte Id => 204; }
        public readonly struct E205 : IGenericEnum { public byte Id => 205; }
        public readonly struct E206 : IGenericEnum { public byte Id => 206; }
        public readonly struct E207 : IGenericEnum { public byte Id => 207; }
        public readonly struct E208 : IGenericEnum { public byte Id => 208; }
        public readonly struct E209 : IGenericEnum { public byte Id => 209; }
        public readonly struct E210 : IGenericEnum { public byte Id => 210; }
        public readonly struct E211 : IGenericEnum { public byte Id => 211; }
        public readonly struct E212 : IGenericEnum { public byte Id => 212; }
        public readonly struct E213 : IGenericEnum { public byte Id => 213; }
        public readonly struct E214 : IGenericEnum { public byte Id => 214; }
        public readonly struct E215 : IGenericEnum { public byte Id => 215; }
        public readonly struct E216 : IGenericEnum { public byte Id => 216; }
        public readonly struct E217 : IGenericEnum { public byte Id => 217; }
        public readonly struct E218 : IGenericEnum { public byte Id => 218; }
        public readonly struct E219 : IGenericEnum { public byte Id => 219; }
        public readonly struct E220 : IGenericEnum { public byte Id => 220; }
        public readonly struct E221 : IGenericEnum { public byte Id => 221; }
        public readonly struct E222 : IGenericEnum { public byte Id => 222; }
        public readonly struct E223 : IGenericEnum { public byte Id => 223; }
        public readonly struct E224 : IGenericEnum { public byte Id => 224; }
        public readonly struct E225 : IGenericEnum { public byte Id => 225; }
        public readonly struct E226 : IGenericEnum { public byte Id => 226; }
        public readonly struct E227 : IGenericEnum { public byte Id => 227; }
        public readonly struct E228 : IGenericEnum { public byte Id => 228; }
        public readonly struct E229 : IGenericEnum { public byte Id => 229; }
        public readonly struct E230 : IGenericEnum { public byte Id => 230; }
        public readonly struct E231 : IGenericEnum { public byte Id => 231; }
        public readonly struct E232 : IGenericEnum { public byte Id => 232; }
        public readonly struct E233 : IGenericEnum { public byte Id => 233; }
        public readonly struct E234 : IGenericEnum { public byte Id => 234; }
        public readonly struct E235 : IGenericEnum { public byte Id => 235; }
        public readonly struct E236 : IGenericEnum { public byte Id => 236; }
        public readonly struct E237 : IGenericEnum { public byte Id => 237; }
        public readonly struct E238 : IGenericEnum { public byte Id => 238; }
        public readonly struct E239 : IGenericEnum { public byte Id => 239; }
        public readonly struct E240 : IGenericEnum { public byte Id => 240; }
        public readonly struct E241 : IGenericEnum { public byte Id => 241; }
        public readonly struct E242 : IGenericEnum { public byte Id => 242; }
        public readonly struct E243 : IGenericEnum { public byte Id => 243; }
        public readonly struct E244 : IGenericEnum { public byte Id => 244; }
        public readonly struct E245 : IGenericEnum { public byte Id => 245; }
        public readonly struct E246 : IGenericEnum { public byte Id => 246; }
        public readonly struct E247 : IGenericEnum { public byte Id => 247; }
        public readonly struct E248 : IGenericEnum { public byte Id => 248; }
        public readonly struct E249 : IGenericEnum { public byte Id => 249; }
        public readonly struct E250 : IGenericEnum { public byte Id => 250; }
        public readonly struct E251 : IGenericEnum { public byte Id => 251; }
        public readonly struct E252 : IGenericEnum { public byte Id => 252; }
        public readonly struct E253 : IGenericEnum { public byte Id => 253; }
        public readonly struct E254 : IGenericEnum { public byte Id => 254; }
        public readonly struct E255 : IGenericEnum { public byte Id => 255; }
    }
}